package com.gimi.cloud.jimi.dao.dao.User;


import java.util.List;

import com.gimi.cloud.jimi.dto.userInfo.RdExpressInfoDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.gimi.cloud.jimi.dao.myMapper.MyMapper;
import com.gimi.cloud.jimi.entity.userInfo.RdExpressInfoEntity;

/**
 * 
 * @author chendi
 * @date 2017年12月28日
 */
public interface UserExpressDao extends MyMapper<RdExpressInfoEntity> {
	
	@Select(value="SELECT * FROM rd_express_info WHERE user_id = #{userId}")
	List<RdExpressInfoEntity> expressListByUser(@Param(value="userId") String userId);

	@Select("SELECT e_id,user_id,`name`,mobile,address,detail_address,add_time,is_delete FROM rd_express_info WHERE user_id = #{userId} AND is_delete = 0 LIMIT 1;")
	RdExpressInfoDTO getByUserId(@Param(value = "userId") Integer userId);
    
}
